Virtualisation and Containerisation
This section will cover the basics of virtualisation and containerisation.
Table of Contents
- Introduction
- Virtualisation
- What is a Hypervisor
- Type 1 or "bare-metal"
- Type 2 or "hosted"
- What is a Hypervisor
- Containerisation
- Advantages and Disadvantages
Introduction
This section will explain what is virtualisation and containerisation and the differences between the two.
Virtualisation
Virtualisation is the process that allows more efficient use of physical computer hardware by creating virtual machines on top of the existing hardware. Virtual machines are simply just virtualised computers.
As not all process and applications uses 100% utilisation, it can be a waste of computing and money by splitting different services onto different servers. Virtualisation solves that by allowing the user to create virtual machines (VMs) on top of the existing hardware or operating system.
Some benefits of virtualisation are:
- Better resource efficiency
- Lower costs in places such as maintenance and power
- Easier management
As services can be run from a single device, this improves the resource efficiency as instead of having multiple servers running different services at, for example, 10% utilisation all the time, a single server can be used.
This also lowers the cost such as maintenance as lesser machines are required. Power costs can potentially be lower as well due to better resource allocation.
As everything is on a single server, this allows for easier management.
To virtualise machines, a hypervisor is required.
What is a Hypervisor
A hypervisor is required to run virtual machines.
There are two main types of hypervisors - Type 1 (Bare-metal) and Type 2 (Hosted).

Type 1 or "bare-metal"
Type 1 hypervisors can interact with the system's hardware directly, allowing for less overhead, better VM performance, resource allocation, and more. Examples of Type 1 hypervisors are Proxmox, VMware ESXi, and XCP-ng.

Type 2 or "hosted"
Type 2 hypervisors run on top of an existing operating system such as Windows 11. This can impact performance and have overhead as they must use the host OS to access underlying hardware resources. Examples of Type 2 hypervisors are VMware Workstation and Oracle VirtualBox.

Containerisation
Containerisation runs on top of an existing host OS and run one application. It is more efficient than virtualisation as it requires lesser resources to run and lower overhead.
Containers share an underlying OS kernel, and only run the application and other dependencies that are required such as software libraries and environment variables. This makes it smaller and faster to deploy when compared to virtual machines.
To deploy containers, a container engine is required. An example of a container engine is Docker engine.

Advantages and Disadvantages
Both virtual machines and containers have their own advantages and disadvantages.
Virtualisation:
| Advantages | Disadvantages |
|---|---|
| Better resource management. | Requires more resources per VM. |
| Isolation from different VMs and the host. | Added complexity due to having more layers. |
Containerisation:
| Advantages | Disadvantages |
|---|---|
| Requires lesser resources per container when compared to VMs. | Added complexity due to having more layers. |
| Better reproducibility as everything is defined in an image. | Networking can be complex due to the way it is setup. |
References: https://www.ibm.com/topics/virtualization